 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">

	<title>운세의 신</title>

	<link rel="stylesheet" type="text/css" href="/css/common.css">
	<link rel="stylesheet" type="text/css" href="/css/sub.css">
    <link rel="stylesheet" type="text/css" href="/css/bbs.css">
    
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>
    	$(document).ready(function() {
			$(".sbest ul li:last").addClass('end');
		});
    </script>
	
</head>
<body>

<div id="wrap">
	<!-- Header -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_header.php'; ?>
	<!--// Header -->

	<!--커튼 데코레이션-->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/drape.php'; ?>
	<!--//커튼 데코레이션-->
    
    <!--컨텐츠-->
	<div id="content">
		<!--나의 정보 /배너/실시간 운세차트-->
		<div class="keybox">
			<!--나의정보-->
			<?php echo $INC_MEMBER; ?>
			<!--//나의정보-->
			
			<!--키배너-->
			<div class="key_bn"><span><img src="/images/sub/bbs/key_v1.jpg" /></span></div>
			<!--//키배너-->
			
			<!--실시간 운세차트-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/unse_chart.php'; ?>
			<!--//실시간운세차트-->
		</div>
		<!--나의 정보 /배너/실시간 운세차트-->

		<!--왼쪽 컨텐츠-->
		<div class="assistant">
			<!--왼쪽 메뉴-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/inc_lnb.php'; ?>
			<!--// 왼쪽 메뉴-->
			
			<!--추천테마-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/theme.php'; ?>
			<!--//추천테마-->
			
			<!--오늘의 추천! 무료운세-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/free.php'; ?>
			<!--//오늘의 추천! 무료운세-->
			
			
			
			<!--회원배너-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/member_join.php'; ?>
			<!--//회원배너-->
		</div>
		<!--//왼쪽 컨텐츠-->

		<!-- 메인컨텐츠-->
		<div class="cont">
<?	if ($cate == 'postscript') : ?>
			<div class="best">
				<div class="fbest">
					<span><img src="/images/common/sum/sum_gunghap_w170.png" alt="1위후기게시물이미지" /></span>
					<dl>
						<h3>[<?=mb_substr($best_list[0]['service_group_name'], 0, -2, 'utf-8')?>]</h3>
						<dt><?=$best_list[0]['service_name']?></dt>
						<dd class="tit"><a href="/bbs/postscript/read?idx=<?=$best_list[0]['idx']?>"><?=mb_substr($best_list[0]['subject'], 0, 13, 'utf-8')?>...</a> </dd>
						<dd><a href="/bbs/postscript/read?idx=<?=$best_list[0]['idx']?>"><?=mb_substr($best_list[0]['content'], 0, 60, 'utf-8')?>...</a></dd>
						<div class="best_bt">
							<a href="<?=$best_list[0]['service_url']?>"><img src="/images/common/board/bt_cont.png" alt="운세보러가기" /></a>
						</div>
					</dl>
				</div>
				<div class="sbest">
					<ul>
<?		$cnt = count($best_list) < 3 ? count($best_list) : 3; ?>
<?		for ($i=1; $i < $cnt; $i++) : ?>
						<li>
							<dl>
						   		<span class="sum"><img src="/images/common/sum/sum_star_w66.png" alt="2위후기게시물이미지" /></span>
								<h3>[<?=mb_substr($best_list[$i]['service_group_name'], 0, -2, 'utf-8')?>]</h3>
								<dt><?=$best_list[$i]['service_name']?></dt>
								<dd class="tit"><a href="/bbs/postscript/read?idx=<?=$best_list[$i]['idx']?>"><?=mb_substr($best_list[$i]['subject'], 0, 8, 'utf-8')?>...</a></dd>
								<dd><a href="/bbs/postscript/read?idx=<?=$best_list[$i]['idx']?>"><?=mb_substr($best_list[$i]['content'], 0, 8, 'utf-8')?>...</a></dd>
							</dl>
						</li>
<?		endfor ?>
					</ul>
				</div>
			</div><!--베스트게시물불러오기-->
<?	endif ?>
			<div class="bbs">
				<h3><?=$category_title?></h3>
				<!--게시판-->
				<div class="list">
					<table width="100%" summary="운신이용후기 번호,제목,작성자,공감,조회수,작성일에 대한 게시판입니다" cellpadding="0" cellspacing="0">
						<caption class="blind">게시판 목록보기</caption>
						<colgroup>
							<col width="10%" />
							<col width="*" />
							<col width="10%" />
							<col width="10%" />
							<col width="10%" />
							<col width="15%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col" class="no">번호</th>
								<th scope="col" class="tle">제목</th>
								<th scope="col" class="writer">작성자</th>
								<th scope="col" class="vote">공감</th>
								<th scope="col" class="hit">조회수</th>
								<th scope="col" class="date">작성일</th>
							</tr>
						</thead>
						<tbody>
						<?	foreach ($notice_list as $item) :?>
							<tr class="notice">
								<td class="no">[공지]</td>
								<td class="tle1"><a href="<?=$read_url.$item['idx']?>"><?=$item['subject']?></a><span class="reply">(<?=$item['reply_cnt']?>)</span></td>
								<td class="writer"><?=$item['nickname']?></td>
								<td class="vote1"><img src="/images/common/board/icon_heart.png" alt="베스트공감" /><?=$item['recommend']?></td>
								<td class="hit"><?=$item['hit']?></td>
								<td class="date"><?=substr($item['create_dt'], 0,10)?></td>
							</tr>
						<?	endforeach ?>
						<?	foreach ($best_list as $item) :?>
							<tr class="notice">
								<td class="no"><img src="/images/common/board/icon_best.png" alt="베스트" /></td>
								<td class="tle1"><a href="<?=$read_url.$item['idx']?>"><?=$item['subject']?></a><span class="reply">(<?=$item['reply_cnt']?>)</span></td>
								<td class="writer"><?=$item['nickname']?></td>
								<td class="vote1"><img src="/images/common/board/icon_heart.png" alt="베스트공감" /><?=$item['recommend']?></td>
								<td class="hit"><?=$item['hit']?></td>
								<td class="date"><?=substr($item['create_dt'], 0,10)?></td>
							</tr>
						<?	endforeach ?>
						<?	foreach ($list as $item) :?>
							<tr>
								<td class="no"><?=$rownum--?></td>
								<td class="tle"><a href="<?=$read_url.$item['idx']?>"><?=$item['subject']?></a><span class="reply">(<?=$item['reply_cnt']?>)</span></td>
								<td class="writer"><?=$item['nickname']?></td>
								<td class="vote"><img src="/images/common/board/icon_heart2.png" alt="베스트공감" /><?=$item['recommend']?></td>
								<td class="hit"><?=$item['hit']?></td>
								<td class="date"><?=substr($item['create_dt'], 0,10)?></td>
							</tr>
						<?	endforeach ?>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="6" class="boardbt_area">
<?	if (!empty($_GET['search_keyword'])) : ?>
									<a href="<?=$uri?>"><img src="/images/common/board/bt_list.png" alt="목록" /></a>
<?	endif ?>
<?	if ($sess_userinfo['login_yn'] == 'Y' && $cate != 'starpt') : ?>
									<a href="<?=$uri?>/write"><img src="/images/common/board/bt_write.png" alt="글쓰기" /></a>
<?	endif ?>
								</td>
							</tr>
							<tr>
								<td colspan="6">
									<!--a href="#" class="btn"><img src="/images/common/board/page_first.png" alt="첫 페이지로" /></a-->
									
									<?	if (!empty($navi['prev_page_link'])) : ?>
										<a href="/<?=$navi['prev_page_link']?>" class="btn"><img src="/images/common/board/page_prev.png" alt="이전 페이지로" /></a> 
									<?	endif ?>
									
									<?	for ($i = 0; $i < count($navi['page_nums']); $i++) : ?>
									<?		if (!empty($navi['page_nums'][$i]['url'])) : ?>
												<a href="/<?=$navi['page_nums'][$i]['url']?>"><?=$navi['page_nums'][$i]['page_no']?></a>
									<?		else : ?>
												<a href="javascript:;" class="over"><?=$navi['page_nums'][$i]['page_no']?></a>
									<?		endif ?>
									<?	endfor ?>

									<?	if (!empty($navi['page_count'])) : ?>
										...<a href="/<?=$navi['page_count_link']?>"><?=$navi['page_count']?></a>
									<?	endif ?>

									<?	if (!empty($navi['next_page_link'])) : ?>
										<a href="/<?=$navi['next_page_link']?>" class="btn"><img src="/images/common/board/page_next.png" alt="다음 페이지로" /></a>
									<?	endif ?>
									
									<!--a href="" class="btn"><img src="/images/common/board/page_end.png" alt="마지막 페이지로" /></a-->
								</td>
							</tr>
						</tfoot>
					</table>
				</div>
				<!--//게시판--> 
				
				<div class="seach">
					<form action="<?=$uri?>" method="get">
						<fieldset>
							<legend>게시판 검색하기</legend>
							<p>
								<select name="search_type" id="search" title="검색어 분류선택" class="input_select">
									<option value="subject">제목</option>
									<option value="nickname">작성자</option>
									<option value="content">내용</option>
								</select>
								<input type="text" name="search_keyword" id="search_keyword" maxlength="30" title="검색어 입력" class="inpText" />
								<input type="image" src="/images/common/board/bt_seach.png" alt="검색" align="top" />
							</p>
						</fieldset>
					</form>
				</div>
			</div>
			<!--리스트--> 
            </div>
		</div>
		<!--// 메인컨텐츠-->
	</div>
	<!--컨텐츠-->
	
	

	<!-- Footer -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_footer.php'; ?>
	<!--// Footer -->
</div>
</body>
</html>